<link href="__ROOT__/Common/css/jquery.treeTable.css" rel="stylesheet"
	type="text/css" />
<style type="text/css">   
     .toolbar {
        /*float: right;*/
        padding-top: 12px;
        padding-left: 20px;
        padding-bottom: 12px;
        }
        

</style>
<div class="row-fluid">
<div class="span">
<div class="box">
<div class="title">
<h4><span class="icon16 cc-icon-support-2"></span> <span>{$title }</span>
</h4>
<a href="#" class="minimize" style="display: none;">Minimize</a></div>
<div class="content noPad clearfix">
<form id="fm_version_remove" class="form-horizontal form-inline" action="__APP__/System/version_remove" method="post">         
<div class='toolbar'>
    <span>
    <a id='btnnew' class="btn btn-small btn-primary" data-toggle="modal" href="#mod_version_add" data-keyboard="false" data-backdrop="false">
      <i class="icon-plus icon-white"></i> 发布新版本 </a>
      
        <button type="submit" id="btndel" class="btn btn-small btn-danger"><i class="icon-trash icon-white"></i> 删除版本</button>
    </span>
</div>

<table id="client_data" cellpadding="0" cellspacing="0" border="0" class="dynamicTable display table table-bordered">
                        <thead>
                            <tr>

                                <th style="width:15px;" id="cbx"><input type="checkbox" id="checkall" onclick="selAll()" /></th>
                                <th style="width:8%;">版本编号</th>
                                <th style="width:25%;">更新包文件</th>
                                <th>版本说明</th>
                                <th style="width:10%;">更新局点</th>
                                <th style="width:15%;">发布日期</th>
                               
                            </tr>
                        </thead>
                        <tbody>
                             <iterate name="version_list" id="item">
                            <tr> 
                                <td id="cbx"><input type="checkbox" id="ids[]" name="ids[]" value="{$item['id']}" class="nostyle"/></td>              
                                
                                <td>{$item['id']}</td>
                                <td>{$item['version_file']}</td>
                                <td style="text-align: left;"><php>echo nl2br($item['description']);</php></td>
                                <td>{$item['DepartName']}</td>
                                <td>{$item['release_date']}</td>
                             </tr>
                            </iterate>
                        </tbody>
                    </table>

</div>
    <div class="content"><div class="pager">{$page}</div></div>
</div>
</form>
    
       
<form id="fm_version_add" class="form-horizontal form-inline" action="__APP__/System/version_add" method="post" enctype="multipart/form-data">    
<div class="modal hide" id="mod_version_add">
  <div class="modal-header">
    <a class="close" data-dismiss="modal">×</a>
    <h4>
        <span>发布新版本</span></h4>
  </div>
  <div class="modal-body">

        
        <fieldset>
            <div class="control-group">
                <label class="control-label" for="">版本编号:</label>
                <div class="controls">
                    <input type="text" id="id" name="id" style="width:120px;" value=""/>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="">版本更新包:</label>
                <div class="controls">
                    <input type="file" id="version_file" name="version_file" placeholder="请选择文件" class="btn btn-small"/>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="">版本更新说明:</label>
                <div class="controls">
                  <textarea align="left"  rows="4" cols="40" id="description" name="description" style="width:300px"></textarea>
                </div>
            </div>
            
            <div class="control-group">
                <label class="control-label" for="">更新局点:</label>
                <div class="controls">
                  <tagLib name="html" /> 
		  <html:select id="depart_id" name="depart_id" options="departs" /> 
                </div>
            </div>        
        </fieldset>

  </div>
  <div class="modal-footer">
    <button type="submit" class="btn btn-small btn-primary" id="loginBtn"><span class="cc-icon-checkmark-3 white"></span> 确定</button>
    <a href="#" class="btn btn-small btn-danger" data-dismiss="modal"><span class="cc-icon-cancel-4 white"></span>关闭</a>
 </div>
</div>
</form>    
    
    
    <script type="text/javascript">
     $(function(){
         //$("input, textarea, select").not(".nostyle").uniform();
         
         $('#checkall').click(function(){ //alert(this.checked)
            $('input[type="checkbox"]').attr("checked",this.checked); 
        });
        
        $("#btndel").click(function(){
           return window.confirm("确认要批量删除吗?");
        });
    
        
        
        $("#fm_version_add").validate({
            rules: {
                    id : "required",
                    version_file:"required"
            },
            messages: {
                    id : "请输入版本号!",
                    version_file:"请选择发布文件"

            }
        });
        
        $('#mod_version_add').on('show', function () {
        // do something…
        document.getElementById("fm_version_add").reset();
    })
    
    
    
    
     });
        
        </script>